invalidValue{
}
notInteger{
}
notFloat{
}
_gethash{
    o=new BytesKeyObjectMap();
    if (create) {
      data.put(key0,o);
  if (!(o instanceof HashMap)) {
    throw invalidValue();
}
_getset{
  Object o=_get(key0);
  if (o == null) {
    o=new BytesKeySet();
      data.put(key0,o);
  if (!(o instanceof BytesKeySet)) {
}
_getzset{
  Object o=_get(key0);
  if (o == null) {
    o=new ZSet();
  if (!(o instanceof ZSet)) {
  return (ZSet)o;
}
_get{
  Object o=data.get(key0);
    Long l=expires.get(key0);
    if (l != null) {
        data.remove(key0);
        return null;
  return o;
}
_change{
  Object o=_get(key0);
    _put(key0,numToBytes(delta,false));
    return integer(delta);
      long integer=bytesToNum((byte[])o) + delta;
      _put(key0,numToBytes(integer,false));
      throw new RedisException(e.getMessage());
}
_change{
  Object o=_get(key0);
    byte[] bytes=_tobytes(delta);
    _put(key0,bytes);
    return new BulkReply(bytes);
      double number=_todouble((byte[])o) + delta;
      byte[] bytes=_tobytes(number);
      _put(key0,bytes);
      return new BulkReply(bytes);
      throw new RedisException(e.getMessage());
}
_test{
  if (bytes.length < div + 1) {
    int mod=(int)(offset % 8);
    int value=bytes[((int)div)] & 0xFF;
}
_getbytes{
  byte[] src;
  if (o instanceof byte[]) {
    src=(byte[])o;
    src=new byte[0];
}
_getlist{
  Object o=_get(key0);
    return (List<BytesKey>)o;
      ArrayList<BytesKey> list=new ArrayList<BytesKey>();
      _put(key0,list);
      return list;
      return null;
}
_put{
  expires.remove(key);
  return data.put(key,value);
}
_put{
  expires.put(key,expiration);
  return data.put(key,value);
}
matches{
  if (kp == key.length) {
    return pp == pattern.length || (pp == pattern.length - 1 && pattern[pp] == '*');
  byte c=key[kp];
case '?':
    return matches(key,pattern,kp + 1,pp + 1);
case '*':
  return matches(key,pattern,kp + 1,pp + 1) || matches(key,pattern,kp + 1,pp);
case '\\':
return c == pattern[pp + 1] && matches(key,pattern,kp + 1,pp + 2);
case '[':
byte b=pattern[pp++];
if (b == c) found=true;
return found && matches(key,pattern,kp + 1,pp);
return c == p && matches(key,pattern,kp + 1,pp + 1);
}
_toposint{
  long offset=bytesToNum(offset1);
}
_toint{
  long offset=bytesToNum(offset1);
}
_torange{
  long offset=bytesToNum(offset1);
    offset=(length + offset);
  return (int)offset;
}
noSuchKey{
  return new RedisException("no such key");
}
now{
  return System.currentTimeMillis();
}
append{
  Object o=_get(key0);
  int length1=value1.length;
    int length0=((byte[])o).length;
    byte[] bytes=new byte[length0 + length1];
    System.arraycopy(o,0,bytes,0,length0);
    System.arraycopy(value1,0,bytes,length0,length1);
    return integer(bytes.length);
    _put(key0,value1);
    return integer(length1);
}
bitcount{
    byte[] bytes=(byte[])o;
    int size=bytes.length;
    int s=_torange(start1,size);
    int e=_torange(end2,size);
    int total=0;
    for (int i=(int)s; i <= e; i++) {
      int b=bytes[i] & 0xFF;
      for (int j=0; j < 8; j++) {
}
bitop{
  BitOp bitOp=BitOp.valueOf(new String(operation0).toUpperCase());
  for (  byte[] aKey2 : key2) {
    int length=aKey2.length;
  for (  byte[] aKey2 : key2) {
    src=_getbytes(aKey2);
      if (bitOp == BitOp.NOT) {
        for (int i=0; i < src.length; i++) {
          bytes[i]=(byte)~(src[i] & 0xFF);
        System.arraycopy(src,0,bytes,0,src.length);
      for (int i=0; i < src.length; i++) {
        int d=bytes[i] & 0xFF;
        int s=src[i] & 0xFF;
case AND:
        break;
case OR:
    break;
case XOR:
break;
return integer(bytes == null ? 0 : bytes.length);
}
decr{ }
decrby{ }
get{
  if (o instanceof byte[]) {
  if (o == null) {
 else {
    throw invalidValue();
}
getbit{
    long offset=bytesToNum(offset1);
    byte[] bytes=(byte[])o;
    return _test(bytes,offset) == 1 ? integer(1) : integer(0);
}
getrange{
  byte[] bytes=_getbytes(key0);
  int size=bytes.length;
  if (e < s)   e=s;
  int length=e - s + 1;
  System.arraycopy(bytes,(int)s,out,0,length);
}
getset{
  Object put=_put(key0,value1);
  if (put == null || put instanceof byte[]) {
    return put == null ? NIL_REPLY : new BulkReply((byte[])put);
    data.put(key0,put);
}
incr{ }
incrby{ }
incrbyfloat{
  return _change(key0,_todouble(increment1));
}
mget{
  int length=key0.length;
  Reply[] replies=new Reply[length];
  for (int i=0; i < length; i++) {
    Object o=_get(key0[i]);
    if (o instanceof byte[]) {
      replies[i]=new BulkReply((byte[])o);
  return new MultiBulkReply(replies);
}
mset{
  int length=key_or_value0.length;
  if (length % 2 != 0) {
    _put(key_or_value0[i],key_or_value0[i + 1]);
}
msetnx{
  int length=key_or_value0.length;
  for (int i=0; i < length; i+=2) {
    if (_get(key_or_value0[i]) != null) {
    _put(key_or_value0[i],key_or_value0[i + 1]);
  return integer(1);
}
psetex{ }
set{ }
setbit{
  int bit=(int)bytesToNum(value2);
  if (bit != 0 && bit != 1)   throw notInteger();
    if (div + 1 > MAX_VALUE)     throw notInteger();
    if (bytes == null || bytes.length < div + 1) {
      bytes=new byte[(int)div + 1];
      if (tmp != null)       System.arraycopy(tmp,0,bytes,0,tmp.length);
    int mod=(int)(offset % 8);
    int value=bytes[((int)div)] & 0xFF;
    int i=value & mask[mod];
        bytes[((int)div)]+=mask[mod];
        bytes[((int)div)]-=mask[mod];
}
setex{ }
setnx{
  if (_get(key0) == null) {
}
setrange{
  byte[] bytes=_getbytes(key0);
  if (bytes.length < length) {
    byte[] tmp=bytes;
    bytes=new byte[length];
    _put(key0,bytes);
  return integer(bytes.length);
}
strlen{
  return integer(_getbytes(key0).length);
}
auth{
  throw new RedisException("Not supported");
}
echo{
  return new BulkReply(message0);
}
ping{ }
quit{ }
select{
  throw new RedisException("Not supported");
}
bgrewriteaof{
  throw new RedisException("Not supported");
}
bgsave{
  throw new RedisException("Not supported");
}
config_get{
  throw new RedisException("Not supported");
}
config_set{
  throw new RedisException("Not supported");
}
config_resetstat{
  throw new RedisException("Not supported");
}
dbsize{
  return integer(data.size());
}
debug_object{
  throw new RedisException("Not supported");
}
debug_segfault{
  throw new RedisException("Not supported");
}
flushall{
  data.clear();
}
flushdb{
  data.clear();
}
info{
  StringBuilder sb=new StringBuilder();
  sb.append("uptime:").append(now() - started).append("\n");
  return new BulkReply(sb.toString().getBytes());
}
lastsave{ }
monitor{ }
save{
  throw new RedisException("Not supported");
}
shutdown{
  throw new RedisException("Not supported");
}
slaveof{ }
slowlog{
  throw new RedisException("Not supported");
}
sync{ }
time{
  long millis=System.currentTimeMillis();
  long seconds=millis / 1000;
  Reply[] replies=new Reply[]{new BulkReply(numToBytes(seconds)),new BulkReply(numToBytes((millis - seconds * 1000) * 1000))};
}
blpop{ }
brpop{ }
brpoplpush{ }
lindex{
  List<BytesKey> list=_getlist(key0,true);
    return NIL_REPLY;
    return new BulkReply(list.get(index).getBytes());
}
linsert{
  Where where=Where.valueOf(new String(where1).toUpperCase());
  List<BytesKey> list=_getlist(key0,true);
  BytesKey pivot=new BytesKey(pivot2);
    return integer(-1);
  list.add(i + (where == Where.BEFORE ? 0 : 1),new BytesKey(value3));
  return integer(list.size());
}
llen{
  List<BytesKey> list=_getlist(key0,false);
}
lpop{
    return NIL_REPLY;
 else {
    return new BulkReply(list.remove(0).getBytes());
}
lpush{
  List<BytesKey> list=_getlist(key0,true);
    list.add(0,new BytesKey(value));
  return integer(list.size());
}
lpushx{
  List<BytesKey> list=_getlist(key0,false);
  if (list == null) {
 else {
  return integer(list.size());
}
lrange{
  List<BytesKey> list=_getlist(key0,false);
    return MultiBulkReply.EMPTY;
    int size=list.size();
    int s=_torange(start1,size);
    int e=_torange(stop2,size);
    int length=e - s + 1;
    Reply[] replies=new Reply[length];
      replies[i - s]=new BulkReply(list.get(i).getBytes());
    return new MultiBulkReply(replies);
}
lrem{
  List<BytesKey> list=_getlist(key0,false);
    int count=_toint(count1);
    BytesKey value=new BytesKey(value2);
    int size=list.size();
    int dir=1;
    int s=0;
    int rem=0;
    for (int i=s; (all || count != 0) && i != e; i+=dir) {
}
lset{
  List<BytesKey> list=_getlist(key0,false);
  int size=list.size();
  int index=_toposint(index1);
  if (index < size) {
    list.set(index,new BytesKey(value2));
}
ltrim{
  List<BytesKey> list=_getlist(key0,false);
    int s=_torange(start1,l);
    int e=_torange(stop2,l);
    data.put(key0,list.subList(s,e + 1));
}
rpop{
  List<BytesKey> list=_getlist(key0,false);
    return NIL_REPLY;
 else {
    byte[] bytes=list.get(l - 1).getBytes();
    list.remove(l - 1);
}
rpoplpush{
  List<BytesKey> source=_getlist(source0,false);
  if (source == null || (l=source.size()) == 0) {
    List<BytesKey> dest=_getlist(destination1,true);
    BytesKey popped=source.get(l - 1);
    dest.add(0,popped);
    return new BulkReply(popped.getBytes());
}
rpush{
  List<BytesKey> list=_getlist(key0,true);
  for (  byte[] bytes : value1) {
    list.add(new BytesKey(bytes));
}
rpushx{
  List<BytesKey> list=_getlist(key0,false);
  if (list == null) {
 else {
    return integer(list.size());
}
del{
    Object remove=data.remove(bytes);
      total++;
    expires.remove(bytes);
  return integer(total);
}
dump{
  throw new RedisException("Not supported");
}
exists{ }
expire{
  Object o=_get(key0);
    return integer(0);
    expires.put(key0,bytesToNum(seconds1) * 1000 + now());
}
expireat{
  Object o=_get(key0);
    return integer(0);
    expires.put(key0,bytesToNum(timestamp1) * 1000);
}
keys{
  List<Reply<ByteBuf>> replies=new ArrayList<Reply<ByteBuf>>();
  for (  Object o : data.keySet()) {
    BytesKey key=(BytesKey)o;
    byte[] bytes=key.getBytes();
    if (matches(bytes,pattern0,0,0)) {
      replies.add(new BulkReply(bytes));
}
migrate{ }
move{
  throw new RedisException("Not supported");
}
object{
  throw new RedisException("Not supported");
}
persist{
  Object o=_get(key0);
    Long remove=expires.remove(key0);
    return remove == null ? integer(0) : integer(1);
}
pexpire{
  Object o=_get(key0);
    return integer(0);
    return integer(1);
}
pexpireat{
  Object o=_get(key0);
    return integer(0);
    return integer(1);
}
pttl{
  Object o=_get(key0);
  if (o == null) {
    return integer(-1);
    Long aLong=expires.get(key0);
      return integer(-1);
}
randomkey{
    int size=data.size();
    if (size == 0) {
      return NIL_REPLY;
      BytesKey key=getRandomKey(data);
      return new BulkReply(key.getBytes());
 catch (    Exception e) {
      throw new RedisException(e);
  return null;
}
getRandomKey{
  Map.Entry[] table=(Map.Entry[])tableField.get(data1);
  int length=table.length;
  Map.Entry entry;
    entry=table[r.nextInt(length)];
 while (entry == null);
  int entries=0;
  Map.Entry current=entry;
    entries++;
    current=(Map.Entry)nextField.get(current);
 while (current != null);
  int choose=r.nextInt(entries);
  current=entry;
  while (choose-- != 0)   current=(Map.Entry)nextField.get(current);
  return (BytesKey)current.getKey();
}
rename{
  Object o=_get(key0);
  if (o == null) {
 else {
    return OK;
}
renamenx{
  Object o=_get(key0);
    Object newo=_get(newkey1);
    if (newo == null) {
      data.put(newkey1,data.remove(key0));
      expires.put(newkey1,expires.remove(key0));
      return integer(1);
      return integer(0);
}
restore{
  throw new RedisException("Not supported");
}
sort{ }
ttl{
  Object o=_get(key0);
  if (o == null) {
    return integer(-1);
      return integer(-1);
      return integer((aLong - now()) / 1000);
}
type{
  if (o == null) {
 else   if (o instanceof byte[]) {
    return new StatusReply("string");
 else   if (o instanceof Map) {
    return new StatusReply("hash");
 else   if (o instanceof List) {
    return new StatusReply("list");
 else   if (o instanceof SortedSet) {
    return new StatusReply("zset");
 else   if (o instanceof Set) {
    return new StatusReply("set");
  return null;
}
unwatch{ }
watch{ }
eval{
  throw new RedisException("Not supported");
}
evalsha{
  throw new RedisException("Not supported");
}
script_exists{
  throw new RedisException("Not supported");
}
script_flush{
  throw new RedisException("Not supported");
}
script_kill{
  throw new RedisException("Not supported");
}
script_load{
  throw new RedisException("Not supported");
}
hdel{
  int total=0;
  return integer(total);
}
hexists{
  return _gethash(key0,false).get(field1) == null ? integer(0) : integer(1);
}
hget{
  byte[] bytes=_gethash(key0,false).get(field1);
  if (bytes == null) {
 else {
    return new BulkReply(bytes);
}
hgetall{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,false);
  int size=hash.size();
  int i=0;
  for (  Map.Entry<Object,byte[]> entry : hash.entrySet()) {
    replies[i++]=new BulkReply(((BytesKey)entry.getKey()).getBytes());
    replies[i++]=new BulkReply(entry.getValue());
}
hincrby{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,true);
  byte[] field=hash.get(field1);
  int increment=_toint(increment2);
    hash.put(field1,increment2);
    int i=_toint(field);
    int value=i + increment;
    hash.put(field1,numToBytes(value,false));
}
hincrbyfloat{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,true);
  byte[] field=hash.get(field1);
  double increment=_todouble(increment2);
    hash.put(field1,increment2);
    return new BulkReply(increment2);
    double d=_todouble(field);
    double value=d + increment;
    byte[] bytes=_tobytes(value);
    hash.put(field1,bytes);
    return new BulkReply(bytes);
}
hkeys{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,false);
  int size=hash.size();
  Reply[] replies=new Reply[size];
  for (  Object hkey : hash.keySet()) {
    replies[i++]=new BulkReply(((BytesKey)hkey).getBytes());
}
hlen{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,false);
}
hmget{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,false);
  int length=field1.length;
  Reply[] replies=new Reply[length];
  for (int i=0; i < length; i++) {
    byte[] bytes=hash.get(field1[i]);
      replies[i]=NIL_REPLY;
      replies[i]=new BulkReply(bytes);
  return new MultiBulkReply(replies);
}
hmset{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,true);
  if (field_or_value1.length % 2 != 0) {
    hash.put(field_or_value1[i],field_or_value1[i + 1]);
}
hset{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,true);
}
hsetnx{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,true);
  byte[] bytes=hash.get(field1);
    return integer(1);
    return integer(0);
}
hvals{
  BytesKeyObjectMap<byte[]> hash=_gethash(key0,false);
  int size=hash.size();
  Reply[] replies=new Reply[size];
  for (  byte[] hvalue : hash.values()) {
    replies[i++]=new BulkReply(hvalue);
}
publish{ }
sadd{
  for (  byte[] bytes : member1) {
    if (set.add(bytes))     total++;
}
scard{
  BytesKeySet bytesKeys=_getset(key0,false);
}
sdiff{
  return _setreply(set);
}
_sdiff{
  BytesKeySet set=null;
  for (  byte[] key : key0) {
    if (set == null) {
      set=new BytesKeySet();
 else {
      BytesKeySet c=_getset(key,false);
      set.removeAll(c);
}
sdiffstore{
  Object o=_get(destination0);
  if (o == null || o instanceof Set) {
    _put(destination0,set);
 else {
}
sinter{ }
_sinter{
  BytesKeySet set=null;
    if (set == null) {
      set=_getset(key,false);
 else {
      BytesKeySet inter=new BytesKeySet();
      BytesKeySet newset=_getset(key,false);
      for (      BytesKey bytesKey : newset) {
          inter.add(bytesKey);
  if (set == null) {
}
sinterstore{
  Object o=_get(destination0);
  if (o == null || o instanceof Set) {
    _put(destination0,set);
}
sismember{
  BytesKeySet set=_getset(key0,false);
}
smembers{ }
_setreply{
  Reply[] replies=new Reply[set.size()];
  int i=0;
    replies[i++]=new BulkReply(value.getBytes());
  return new MultiBulkReply(replies);
}
smove{
  BytesKeySet source=_getset(source0,false);
    BytesKeySet dest=_getset(destination1,true);
    return integer(0);
}
spop{
  if (mapField == null || tableField == null) {
    throw new RedisException("Not supported");
  BytesKeySet set=_getset(key0,false);
  if (set.size() == 0)   return NIL_REPLY;
    BytesKey key=getRandomKey((Map)mapField.get(set));
    set.remove(key);
    return new BulkReply(key.getBytes());
 catch (  IllegalAccessException e) {
    throw new RedisException("Not supported");
}
srandmember{
  if (mapField == null || tableField == null) {
    throw new RedisException("Not supported");
  BytesKeySet set=_getset(key0,false);
  if (set.size() == 0)   return NIL_REPLY;
    BytesKey key=getRandomKey((Map)mapField.get(set));
    return new BulkReply(key.getBytes());
 catch (  IllegalAccessException e) {
    throw new RedisException("Not supported");
}
srem{
  BytesKeySet set=_getset(key0,false);
  for (  byte[] member : member1) {
    if (set.remove(member)) {
}
sunion{ }
_sunion{
  BytesKeySet set=null;
  for (  byte[] key : key0) {
    if (set == null) {
      set.addAll(_getset(key,false));
 else {
  if (set == null) {
}
sunionstore{
  Object o=_get(destination0);
  if (o == null || o instanceof Set) {
    _put(destination0,set);
}
zadd{
  if (args.length < 3 || (args.length - 1) % 2 == 1) {
  ZSet zset=_getzset(key,true);
  for (int i=1; i < args.length; i+=2) {
    if (zset.add(new BytesKey(value),_todouble(score))) {
}
_todouble{
  return parseDouble(new String(score));
}
zcard{
  ZSet zset=_getzset(key0,false);
}
zcount{
  Iterable<ZSetEntry> entries=zset.subSet(_todouble(min1),_todouble(max2));
  int total=0;
    if (entry.getScore() == min.value && !min.inclusive) {
    if (entry.getScore() == max.value && !max.inclusive) {
    total++;
  return integer(total);
}
zincrby{
  ZSet zset=_getzset(key0,true);
  ZSetEntry entry=zset.get(member2);
  double increment=_todouble(increment1);
  if (entry == null) {
    zset.add(new BytesKey(member2),increment);
    return new BulkReply(increment1);
    zset.remove(member2);
    zset.add(entry.getKey(),entry.getScore() + increment);
    return new BulkReply(_tobytes(entry.getScore()));
}
zinterstore{ }
_zstore{
  if (destination0 == null || numkeys1 == null) {
  if (key2.length < numkeys) {
  double[] weights=null;
  Aggregate type=null;
  if (key2.length > position) {
    if ("weights".equals(new String(key2[position]).toLowerCase())) {
      if (key2.length < position + numkeys) {
      weights=new double[numkeys];
      for (int i=position; i < position + numkeys; i++) {
        weights[i - position]=_todouble(key2[i]);
      position+=numkeys;
    if (key2.length > position + 1) {
      if ("aggregate".equals(new String(key2[position]).toLowerCase())) {
        type=Aggregate.valueOf(new String(key2[position + 1]).toUpperCase());
 else     if (key2.length != position) {
  del(new byte[][]{destination0});
  ZSet destination=_getzset(destination0,true);
  for (int i=0; i < numkeys; i++) {
    ZSet zset=_getzset(key2[i],false);
      if (weights == null) {
        destination.addAll(zset);
        double weight=weights[i];
        for (        ZSetEntry entry : zset) {
          destination.add(entry.getKey(),entry.getScore() * weight);
      for (      ZSetEntry entry : zset) {
        BytesKey key=entry.getKey();
        ZSetEntry current=destination.get(key);
        destination.remove(key);
        if (union || current != null) {
          double newscore=entry.getScore() * (weights == null ? 1 : weights[i]);
          if (type == null || type == Aggregate.SUM) {
            if (current != null) {
              newscore+=current.getScore();
 else           if (type == Aggregate.MIN) {
            if (current != null && newscore > current.getScore()) {
              newscore=current.getScore();
 else           if (type == Aggregate.MAX) {
            if (current != null && newscore < current.getScore()) {
              newscore=current.getScore();
          destination.add(key,newscore);
        for (        ZSetEntry entry : new ZSet(destination)) {
          BytesKey key=entry.getKey();
          if (zset.get(key) == null) {
}
zrange{
  if (key0 == null || start1 == null || stop2 == null) {
  ZSet zset=_getzset(key0,false);
  int size=zset.size();
  int start=_torange(start1,size);
  int end=_torange(stop2,size);
  Iterator<ZSetEntry> iterator=zset.iterator();
  List<Reply<ByteBuf>> list=new ArrayList<Reply<ByteBuf>>();
      ZSetEntry next=iterator.next();
        list.add(new BulkReply(next.getKey().getBytes()));
        if (withscores) {
          list.add(new BulkReply(_tobytes(next.getScore())));
  return new MultiBulkReply(list.toArray(new Reply[list.size()]));
}
_checkcommand{
  boolean result;
    if (new String(check).toLowerCase().equals(command)) {
      result=true;
        throw new RedisException("syntax error");
        return false;
    result=false;
  return result;
}
zrangebyscore{
  ZSet zset=_getzset(key0,false);
  if (zset.isEmpty())   return MultiBulkReply.EMPTY;
}
_zrangebyscore{
  if (withscores_offset_or_count4.length > 0) {
    withscores=_checkcommand(withscores_offset_or_count4[0],"withscores",false);
  if (withscores_offset_or_count4.length > position) {
    limit=_checkcommand(withscores_offset_or_count4[position++],"limit",true);
  if (withscores_offset_or_count4.length != position + (limit ? 2 : 0)) {
  int number=Integer.MAX_VALUE;
    offset=_toint(withscores_offset_or_count4[position++]);
    number=_toint(withscores_offset_or_count4[position]);
  Score max=_toscorerange(max2);
  List<ZSetEntry> entries=zset.subSet(min.value,max.value);
  int current=0;
  List<Reply<ByteBuf>> list=new ArrayList<Reply<ByteBuf>>();
    if (current >= offset && current < offset + number) {
      list.add(new BulkReply(entry.getKey().getBytes()));
      if (withscores)       list.add(new BulkReply(_tobytes(entry.getScore())));
}
_toscorerange{
  Score score=new Score();
  String s=new String(specifier).toLowerCase();
  if (s.startsWith("(")) {
    score.inclusive=false;
    s=s.substring(1);
  if (s.equals("-inf")) {
    score.value=Double.NEGATIVE_INFINITY;
 else   if (s.equals("inf") || s.equals("+inf")) {
    score.value=Double.POSITIVE_INFINITY;
 else {
    score.value=Double.parseDouble(s);
}
zrank{
  List<ZSetEntry> zset=_getzset(key0,false).list();
}
zrem{
  ZSet zset=_getzset(key0,false);
  if (zset.isEmpty())   return integer(0);
    if (zset.remove(member)) {
}
zremrangebyrank{
  ZSet zset=_getzset(key0,false);
  if (zset.isEmpty())   return integer(0);
  int size=zset.size();
  int start=_torange(start1,size);
  int end=_torange(stop2,size);
  Iterator<ZSetEntry> iterator=zset.iterator();
  List<ZSetEntry> list=new ArrayList<ZSetEntry>();
  for (int i=0; i < size; i++) {
      ZSetEntry next=iterator.next();
  int total=0;
  for (  ZSetEntry zSetEntry : list) {
    if (zset.remove(zSetEntry.getKey()))     total++;
}
zremrangebyscore{
  ZSet zset=_getzset(key0,false);
  if (zset.isEmpty())   return integer(0);
  List<ZSetEntry> entries=zset.subSet(min.value,max.value);
  for (  ZSetEntry entry : new ArrayList<ZSetEntry>(entries)) {
    if (!min.inclusive && entry.getScore() == min.value)     continue;
    if (!max.inclusive && entry.getScore() == max.value)     continue;
}
zrevrange{
  if (key0 == null || start1 == null || stop2 == null) {
  ZSet zset=_getzset(key0,false);
  int size=zset.size();
  int end=size - _torange(start1,size) - 1;
  int start=size - _torange(stop2,size) - 1;
  Iterator<ZSetEntry> iterator=zset.iterator();
  List<Reply<ByteBuf>> list=new ArrayList<Reply<ByteBuf>>();
  for (int i=0; i < size; i++) {
      ZSetEntry next=iterator.next();
        list.add(0,new BulkReply(next.getKey().getBytes()));
        if (withscores) {
          list.add(1,new BulkReply(_tobytes(next.getScore())));
  return new MultiBulkReply(list.toArray(new Reply[list.size()]));
}
zrevrangebyscore{
  ZSet zset=_getzset(key0,false);
  if (zset.isEmpty())   return MultiBulkReply.EMPTY;
}
zrevrank{
  List<ZSetEntry> zset=_getzset(key0,false).list();
  Collections.reverse(zset);
}
_zrank{
  BytesKey member=new BytesKey(member1);
    if (entry.getKey().equals(member)) {
      return integer(position);
}
zscore{
  ZSet zset=_getzset(key0,false);
  ZSetEntry entry=zset.get(member1);
  double score=entry.getScore();
}
_tobytes{
  return String.valueOf(score).getBytes();
}
zunionstore{ }
